home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 38
/
Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso
/
-seriously_amiga-
/
misc
/
wordconverter
/
rexx
/
cedimportword.ced
next >
Wrap
Text File
|
1999-02-08
|
2KB
|
70 lines
/*rx
* $VER: CEDImportWord.ced 1.0.0 (19.10.97) ©1997 Peter Drapich
* This ARexx script is for use with CygnusEd text editor.
*
* CEDImportWord.ced is a part of WordConverter archive and imports texts from documents
* created with Word for Windows or Mac into CygnusEd.
*
* During execution of this script, you'll be asked with the filerequester for the
* source Word document filename.
* This script uses WordConverter to convert Word documents into text.
* If WordConverter isnt in the current path, you'll be prompted to select its current
* location.
*
* WordConverter and CEDImportWord.ced were written by Peter Drapich in 1997
* and are shareware software copyrighted by Peter Drapich.
*
* Email any remarks or new ideas to: docent@union.org.pl
*
*/
CR = '0A'X
ERR_REVUNKNOWN=6 /* these are internal error codes, returned by WordConverter */
ERR_NOTWORDFILE=8
options results
address "rexx_ced"
options failat 20
filename = 'WordConverter'
do while ~exists(filename)
msgtext='Couldnt find WordConverter in current path.'||CR||'Please select its correct location and filename.'
okay1 msgtext
getfilename 'WordConverter'
if result = 'result' then exit 0
filename = result
end
okay1 'Please select Word document to import.'
filename = '"'||filename||'"'
getfilename ''
if (result = 'result') then
do
okay1 'No source filename was specified.'
exit 0
end
srcfilename = result
srcfilename = '"'||srcfilename||'"'
tempname = 'T:wordconv.temp'
commandrc=1
do while (commandrc)
address command filename srcfilename tempname
commandrc = rc
if commandrc=ERR_REVUNKNOWN then do
msgtext='Unknown revision of Word document'||CR||'Do you want to read it anyway ?'
okay2 msgtext
replyrc=result
if replyrc=0 then exit 0
address command filename srcfilename tempname 'force'
commandrc = rc
end
if commandrc=ERR_NOTWORDFILE then do
okay1 'This is not a Word file.'
exit 0
end
if commandrc>0 & commandrc~=ERR_REVUNKNOWN then do
okay1 'An error has occured.'
exit 0
end
end
'open new'
'open...' tempname||'.txt'
address command 'delete' tempname||'.txt quiet'
exit 0